﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HalconDisplayControl.Attributes;
using HalconDotNet;

namespace HalconDisplayControl.Shape
{
    public class EllipseSectorShape : IShape
    {
        [ParamName("row")]
        public double Row { get; set; } = 200;
        [ParamName("column")]

        public double Column { get; set; } = 200;
        [ParamName("phi")]

        public double Phi { get; set; } = 0;
        [ParamName("radius1")]

        public double Radius1 { get; set; } = 100;
        [ParamName("radius2")]

        public double Radius2 { get; set; } = 60;
        [ParamName("start_angle")]

        public double StartAngle { get; set; } = 0;
        [ParamName("end_angle")]

        public double EndAngle { get; set; } = 3.14159;

        public void CreateDrawingObj(out HTuple drawId)
        {
            HOperatorSet.CreateDrawingObjectEllipseSector(Row, Column, Phi, Radius1, Radius2, StartAngle, EndAngle, out drawId);
        }

        public void CreateShapeObj(out HObject shapeObj)
        {
            HOperatorSet.GenEllipseSector(out shapeObj, Row, Column, Phi, Radius1, Radius2, StartAngle, EndAngle);
        }
    }
}
